CXX = g++
CFLAGS = -g
CXXFLAGS=$(CFLAGS)
CXXFLAGS += -I extrapackage/
LDFLAGS += -L extrapackage/lapacke
LDLIBS += -llapacke -llapack -lcblas -lrefblas -lm -lgfortran 

prepare:
	$(CXX) polynomial.cpp fileoutput.cpp -o fileoutput $(LDLIBS) $(LDFLAGS) $(CXXFLAGS)
	./fileoutput

run:
	$(CXX) polynomial.cpp main.cpp -o main $(LDLIBS) $(LDFLAGS) $(CXXFLAGS)
	./main

plot:
	python plot.py

clean:
	rm *.log *.aux main fileoutput

report:
	xelatex report.tex
	code report.pdf

.PHONY:
	clean